define(["jquery", "easy-admin"], function ($, ea) {

   
    var init = {
        table_elem: '#currentTable',
        table_render_id: 'currentTableRenderId',
        index_url: 'mall.feedback/index',
        edit_url: 'mall.feedback/edit',
        export_url: 'mall.feedback/export',
        modify_url: 'mall.feedback/modify',
    };

    var Controller = {
        index: function () {
            ea.table.render({
                init: init,
                height:'full-50',
                toolbar: ['refresh',
                    [],
                    'export'],
                cols: [[
                    {type: "checkbox"},
                    {field: 'id', width: 80, title: 'ID',search: false},
                    {field: 'mobile', minWidth: 150, title: '反馈手机号'},
                    {field: 'content', minWidth: 400, title: '反馈内容'},
                    {field: 'status', title: '标记查看状态', width: 150, search: 'select', selectList: {0: '未查看', 1: '已查看'}},
                    {field: 'create_time',minWidth: 150,  title: '创建时间', search: 'range'},
                    {
                        width: 150,
                        title: '操作',
                        templet: ea.table.tool,
                        operat: [
                            [{
                                text: '确认查看',
                                url: init.edit_url,
                                method: 'confirm',
                                auth: 'edit',
                                class: 'layui-btn layui-btn-xs layui-btn-normal',
                                extend: 'data-full="true"',
                                show:[
                                    {"name":"status","value":"0"}
                                ]
                            }],
                        ]
                    },
                ]],
            });
            ea.listen();
        },
        edit: function () {
            ea.listen();
        },
    };
    return Controller;
});